home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 076-100 / disk_098 / hddriver / driver / begin.asm < prev    next >
Assembly Source File  |  1992-05-06  |  1KB  |  50 lines

  1.     include    "exec/types.i"
  2.     include    "exec/resident.i"
  3.     include "exec/nodes.i"
  4.     include "hdasm.i"
  5.  
  6.     XDEF    .begin
  7. .begin:
  8.     clr.l    d0
  9.     rts
  10.  
  11. ;
  12. ; This structure needs to be near the beginning of the file so
  13. ; that AmigaDOS realises that this is a device driver
  14. ;
  15. ; The C version of the structure is shown below. However, since
  16. ; I want it in the code segment (not the data segment) its given
  17. ; here in assembler
  18. ;
  19. ; static struct Resident rom_tag = {
  20. ;    RTC_MATCHWORD ,
  21. ;    &rom_tag ,
  22. ;    (APTR)((&rom_tag)+1) ,
  23. ;    RTF_AUTOINIT ,
  24. ;    HD_VERSION ,
  25. ;    NT_DEVICE ,
  26. ;    HD_PRIORITY ,
  27. ;    dev_name ,
  28. ;    dev_id_string ,
  29. ;    (APTR)&AutoInit ,
  30. ; };
  31. ;
  32.  
  33.     XREF    _dev_name
  34.     XREF    _dev_id_string
  35.     XREF    _AutoInit
  36.  
  37. rom_tag
  38.     dc.w    RTC_MATCHWORD        ; special marker
  39.     dc.l    rom_tag                ; pointer to itself for double checking
  40.     dc.l    end_tag                ; pointer somewhere beyond end of structure
  41.     dc.b    RTF_AUTOINIT        ; autoinitialize structures
  42.     dc.b    HD_VERSION            ; version
  43.     dc.b    NT_DEVICE            ; device
  44.     dc.b    HD_PRIORITY            ; priority of driver
  45.     dc.l    _dev_name            ; name of device
  46.     dc.l    _dev_id_string        ; device id string
  47.     dc.l    _AutoInit            ; initialization block
  48. end_tag
  49.  
  50.